package com.molichuxing.gateway.bff.advert.convertor;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.BeanUtils;

import com.molichuxing.gateway.bff.advert.entity.response.AdvertStoreVo;
import com.molichuxing.gateway.bff.goods.entity.response.ContractTemplateVo;
import com.molichuxing.services.business.dto.response.DealerStoreInfoBizDto;

/**
 * @author: liyg
 **/
public class Convert {


    public static List<AdvertStoreVo> toAdvertStoreVo(List<DealerStoreInfoBizDto> dtoList) {
        List<AdvertStoreVo> voList = null;;
        if (dtoList != null && dtoList.size() > 0) {
        	voList = new ArrayList<>();
            for (DealerStoreInfoBizDto bean : dtoList) {
            	voList.add(toAdvertStoreVo(bean));
            }
        }
        return voList;
    }

    public static AdvertStoreVo toAdvertStoreVo(DealerStoreInfoBizDto dto) {
    	AdvertStoreVo vo = null;
        if (dto != null) {
            vo = new AdvertStoreVo();
            vo.setDealerId(dto.getDealerId());
            vo.setDealerName(dto.getDealerShortName());
            vo.setStoreId(dto.getStoreId());
            vo.setStoreName(dto.getStoreShortName());
        }
        return vo;
    }

    
}
